home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
AOL File Library: 4,401 to 4,500
/
aol-file-protocol-4400-4401-to-4500.zip
/
AOLDLs
/
PDA-Newton Development
/
ND+ Add PICT to Card (NS-Basic)
/
NSPICT.txt
< prev
Wrap
Text File
|
2014-12-08
|
2KB
|
48 lines
Here's a neat hack in NS BASIC. It puts a PICT into the Notes slot of
the Names app. Now, when you beam your business card, you can have a
custom designed picture, or perhaps your company logo. If you're gonna
be at MacWorld, this is a great way to wow people you beam!
Note: To do this, you'll need the NTK, either the live or demo version.
NS BASIC isn't strictly needed, but makes it easy.
Here's the program:
0010 LET x=getroot().|txtxfer:NSBASIC|._proto.stepchildren[13]
0020 open ch,"Names",sortOn
0030 get ch,n,"Henne"
0050 LET n.notes=[{viewStationery: 'poly}]
0060 LET n.notes[0].viewBounds={left: 0, top: 0, right: 236, bottom: 96}
0070 LET n.notes[0]._proto=removeSlot(x,'preallocatedContext)
0080 put ch,n
How to:
1. Create your graphic in some sort of drawing program. I use HyperCard.
2. Using ResEdit, cut and paste the graphic into a resource file that's
included in a project in NTK. Mine was called |txtxfer:NSBASIC|.
Make sure you've named the resource in ResEdit.
3. In your project, define a clPictureView. Set the value of the icon
slot to your named resource, and download it.
4. Now, look at the stepchildren slots of your app. You can do this in
NS BASIC by typing
0010 LET x=getroot().|txtxfer:NSBASIC|._proto.stepchildren
RUN
VARS
See which element of stepChildren is your clPictureView.
5. Modify line 10 of the above program to name your application and
address the correct element of stepChildren.
6. Modify line 30 to get your own card in Names
7. Run it!
NS BASIC has gotta be one of the neatest hacking tools around for the
Newton (along with ViewFrame!)
[My thanks to Sidney Low, who first figured out how to do this]
--
George W.P. Henne gh@hookup.net
The Eastwood Group
416 264-5777 fax 416 264-5888